package com.fsi.client;

import java.io.Serializable;
import java.util.Date;

import javax.jdo.annotations.Extension;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Customer implements Serializable {
	public static final int UPDATEFIXED = 0;
	public static final int UPDATEGENERAL = 1;
	public static final String[] GENDERS = { "Female", "Male" };
	public static final String[] COUNTRIES = { "Australia", "New Zealand",
			"Other" };

	private static final long serialVersionUID = 1L;

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	@Extension(vendorName = "datanucleus", key = "gae.encoded-pk", value = "true")
	private String encodedKey;

	@Persistent
	@Extension(vendorName = "datanucleus", key = "gae.pk-name", value = "true")
	private String loginEmailAddress;

	@Persistent
	private String password;

	@Persistent
	private String userName;

	@Persistent
	private Date birthdate;

	@Persistent
	private int gender;

	@Persistent
	private int country;

	@Persistent
	private int ethnicity;

	@Persistent
	private String firstName;

	@Persistent
	private String lastName;

	@Persistent
	private String emailAddress;

	@Persistent
	private String address1;

	@Persistent
	private String address2;

	@Persistent
	private int city;

	@Persistent
	private String postCode;

	@Persistent
	private int state;

	@Persistent
	private boolean smoker;

	@Persistent
	private String description;

	@Persistent
	private String firstDate;

	@Persistent
	private String photoID;

	public String getPhotoID() {
		return photoID;
	}

	public void setPhotoID(String photoID) {
		this.photoID = photoID;
	}

	public Customer() {
	}

	public Customer(String firstName) {
		super();
		this.firstName = firstName;
	}

	public Customer(String loginEmail, String userName, String password,
			String email, int gender, int country, String postCode,
			Date birthdate) {
		super();
		this.loginEmailAddress = loginEmail;
		this.userName = userName;
		this.password = password;
		this.emailAddress = email;
		this.gender = gender;
		this.country = country;
		this.postCode = postCode;
		this.smoker = false;
		this.birthdate = birthdate;
		this.photoID = null;
	}

	public boolean isSmoker() {
		return smoker;
	}

	public void setSmoker(boolean smoker) {
		this.smoker = smoker;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getFirstDate() {
		return firstDate;
	}

	public void setFirstDate(String firstDate) {
		this.firstDate = firstDate;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public Date getBirthdate() {
		return birthdate;
	}

	public void setBirthdate(Date birthdate) {
		this.birthdate = birthdate;
	}

	public int getGender() {
		return gender;
	}

	public void setGender(int gender) {
		this.gender = gender;
	}

	public int getCountry() {
		return country;
	}

	public void setCountry(int country) {
		this.country = country;
	}

	public int getEthnicity() {
		return ethnicity;
	}

	public void setEthnicity(int ethnicity) {
		this.ethnicity = ethnicity;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLoginEmailAddress() {
		return loginEmailAddress;
	}

	public void setLoginEmailAddress(String loginEmailAddress) {
		this.loginEmailAddress = loginEmailAddress;
	}

	public String getCustomerName() {
		return firstName;
	}

	public void setCustomerName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getEmailAddress() {
		return emailAddress;
	}

	public void setEmailAddress(String emailAddress) {
		this.emailAddress = emailAddress;
	}

	public String getAddress1() {
		return address1;
	}

	public void setAddress1(String address1) {
		this.address1 = address1;
	}

	public String getAddress2() {
		return address2;
	}

	public void setAddress2(String address2) {
		this.address2 = address2;
	}

	public int getCity() {
		return city;
	}

	public void setCity(int city) {
		this.city = city;
	}

	public String getPostCode() {
		return postCode;
	}

	public void setPostCode(String postCode) {
		this.postCode = postCode;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

}
